﻿namespace Preactor.ObjectModel.BaseTypes.MaterialControl
{
    using System;

    using Preactor.ObjectModel.Attributes;
    using Preactor.ObjectModel.Entities;
    using Preactor.ObjectModel.Interfaces.MaterialControl;

    public class PeggingRule : PreactorRecord, IPeggingRule
    {
        public PeggingRule(PrimaryKey id, PreactorObjectModel preactorObjectModel)
            : base(id, preactorObjectModel)
        {
        }

        [PreactorField("PEGGING RULES TABLE", FieldDeclarationType.FieldClassification)]
        public string BelongsToRuleSet { get { return (string)GetValue("BelongsToRuleSet"); } set { SetValue("BelongsToRuleSet", value); } }

        [PreactorField("Number", FieldDeclarationType.FieldClassification)]
        public int Number { get { return (int)GetValue("Number"); } set { SetValue("Number", value); } }

        [PreactorField("RULE SET", FieldDeclarationType.FieldClassification)]
        public string RuleSet { get { return (string)GetValue("RuleSet"); } set { SetValue("RuleSet", value); } }

        [PreactorField("CLEAR LINKS", FieldDeclarationType.FieldClassification)]
        public bool ClearCurrentLinks { get { return (bool)GetValue("ClearCurrentLinks"); } set { SetValue("ClearCurrentLinks", value); } }

        [PreactorField("First Pass Clear", FieldDeclarationType.FieldClassification)]
        public bool FirstPassClear { get { return (bool)GetValue("FirstPassClear"); } set { SetValue("FirstPassClear", value); } }

        [PreactorField("RULE NAME", FieldDeclarationType.FieldClassification)]
        public string Rule { get { return (string)GetValue("Rule"); } set { SetValue("Rule", value); } }

        [PreactorField("RULE ENABLED", FieldDeclarationType.FieldClassification)]
        public bool Enabled { get { return (bool)GetValue("Enabled"); } set { SetValue("Enabled", value); } }

        [PreactorField("DEBUG ENABLED", FieldDeclarationType.FieldClassification)]
        public bool DebugThisRule { get { return (bool)GetValue("DebugThisRule"); } set { SetValue("DebugThisRule", value); } }

        [PreactorField("INTERNAL SUPPLY ONLY", FieldDeclarationType.FieldClassification)]
        public bool InternalSupplyOnly { get { return (bool)GetValue("InternalSupplyOnly"); } set { SetValue("InternalSupplyOnly", value); } }

        [PreactorField("INTERNAL SUPPLY FILTER", FieldDeclarationType.FieldClassification)]
        public string InternalSuppyQueueFilter { get { return (string)GetValue("InternalSuppyQueueFilter"); } set { SetValue("InternalSuppyQueueFilter", value); } }

        [PreactorField("External Supply Queue Filter Toggle", FieldDeclarationType.FieldClassification)]
        public bool ExternalSupplyQueueFilterToggle { get { return (bool)GetValue("ExternalSupplyQueueFilter"); } set { SetValue("ExternalSupplyQueueFilter", value); } }

        [PreactorField("EXTERNAL SUPPLY FILTER", FieldDeclarationType.FieldClassification)]
        public string ExternalSupplyQueueFilter { get { return (string)GetValue("ExternalSupplyQueueFilter"); } set { SetValue("ExternalSupplyQueueFilter", value); } }

        [PreactorField("Supply Queue Ranking Toggle", FieldDeclarationType.FieldClassification)]
        public bool SupplyQueueRankingToggle { get { return (bool)GetValue("SupplyQueueRankingToggle"); } set { SetValue("SupplyQueueRankingToggle", value); } }

        [PreactorField("ENABLE INHERIT FROM SUPPLY", FieldDeclarationType.FieldClassification)]
        public bool InheritFromSupply { get { return (bool)GetValue("InheritFromSupply"); } set { SetValue("InheritFromSupply", value); } }

        [PreactorField("INTERNAL DEMAND ONLY", FieldDeclarationType.FieldClassification)]
        public bool InternalDemandOnly { get { return (bool)GetValue("InternalDemandOnly"); } set { SetValue("InternalDemandOnly", value); } }

        [PreactorField("PEG SCHEDULED ORDERS", FieldDeclarationType.FieldClassification)]
        public bool IncludeScheduledOrdersInDemandQueue { get { return (bool)GetValue("IncludeScheduledOrdersInDemandQueue"); } set { SetValue("IncludeScheduledOrdersInDemandQueue", value); } }

        [PreactorField("INTERNAL DEMAND FILTER", FieldDeclarationType.FieldClassification)]
        public string InternalDemandQueueFilter { get { return (string)GetValue("InternalDemandQueueFilter"); } set { SetValue("InternalDemandQueueFilter", value); } }

        [PreactorField("EXTERNAL DEMAND FILTER", FieldDeclarationType.FieldClassification)]
        public string ExternalDemandQueueFilter { get { return (string)GetValue("ExternalDemandQueueFilter"); } set { SetValue("ExternalDemandQueueFilter", value); } }

        [PreactorField("Demand Queue Ranking Toggle", FieldDeclarationType.FieldClassification)]
        public bool DemandQueueRankingToggle { get { return (bool)GetValue("DemandQueueRankingToggle"); } set { SetValue("DemandQueueRankingToggle", value); } }

        [PreactorField("ENABLE INHERIT FROM DEMAND", FieldDeclarationType.FieldClassification)]
        public bool InheritFromDemand { get { return (bool)GetValue("InheritFromDemand"); } set { SetValue("InheritFromDemand", value); } }

        [PreactorField("Inherit From Demand Toggle", FieldDeclarationType.FieldClassification)]
        public bool InheritFromDemandToggle { get { return (bool)GetValue("InheritFromDemandToggle"); } set { SetValue("InheritFromDemandToggle", value); } }

        [PreactorField("Inherit From Supply Toggle", FieldDeclarationType.FieldClassification)]
        public bool InheritFromSupplyToggle { get { return (bool)GetValue("InheritFromSupplyToggle"); } set { SetValue("InheritFromSupplyToggle", value); } }

        [PreactorField("RULE TYPE", FieldDeclarationType.FieldClassification)]
        public string RuleType { get { return (string)GetValue("RuleType"); } set { SetValue("RuleType", value); } }

        [PreactorField("User Defined Rule Toggle", FieldDeclarationType.FieldClassification)]
        public bool UserDefinedRuleToggle { get { return (bool)GetValue("UserDefinedRuleToggle"); } set { SetValue("UserDefinedRuleToggle", value); } }

        [PreactorField("USER DEFINED EXPRESSION", FieldDeclarationType.FieldClassification)]
        public string Expression { get { return (string)GetValue("Expression"); } set { SetValue("Expression", value); } }

        [PreactorField("PESP Script Toggle", FieldDeclarationType.FieldClassification)]
        public bool PespScriptToggle { get { return (bool)GetValue("PespScriptToggle"); } set { SetValue("PespScriptToggle", value); } }

        [PreactorField("USER DEFINED PESP SCRIPT", FieldDeclarationType.FieldClassification)]
        public string PespScript { get { return (string)GetValue("PespScript"); } set { SetValue("PespScript", value); } }

        [PreactorField("MULTIPLES ONLY", FieldDeclarationType.FieldClassification)]
        public bool AllocateMultiplesOnly { get { return (bool)GetValue("AllocateMultiplesOnly"); } set { SetValue("AllocateMultiplesOnly", value); } }

        [PreactorField("RETAIN PARTIAL", FieldDeclarationType.FieldClassification)]
        public bool RetainPartialAndCompleteAllocations { get { return (bool)GetValue("RetainPartialAndCompleteAllocations"); } set { SetValue("RetainPartialAndCompleteAllocations", value); } }

        [PreactorField("Retain Allocations Toggle", FieldDeclarationType.FieldClassification)]
        public bool RetainAllocations { get { return (bool)GetValue("RetainAllocations"); } set { SetValue("RetainAllocations", value); } }

        [PreactorField("RETAIN COMPLETE", FieldDeclarationType.FieldClassification)]
        public bool RetainCompleteAllocations { get { return (bool)GetValue("RetainCompleteAllocations"); } set { SetValue("RetainCompleteAllocations", value); } }

        [PreactorField("ALLOW BACKWARD LINKS", FieldDeclarationType.FieldClassification)]
        public bool AllowBackwardLinks { get { return (bool)GetValue("AllowBackwardLinks"); } set { SetValue("AllowBackwardLinks", value); } }
    }
}